package com.yequan.hbb.servers;


import android.support.annotation.NonNull;

import com.yequan.hbb.entries.AnswerEntries;
import com.yequan.hbb.entries.DynamicEntries;
import com.yequan.hbb.entries.EntrySearch;
import com.yequan.hbb.entries.HelpChoseEntries;
import com.yequan.hbb.entries.HelpSaveEntris;
import com.yequan.hbb.entries.LearnHP;
import com.yequan.hbb.entries.QuestionEntries;
import com.yequan.hbb.entries.QuestionSearch;
import com.yequan.hbb.entries.SearchEntry;
import com.yequan.hbb.entries.TuanTuanEntries;
import com.yequan.hbb.entries.TypeListEntry;

import com.yequan.hbb.entries.FocusBean;
import com.yequan.hbb.entries.RecentBean;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2016/10/12.
 */

public interface Servers {




    @GET("/classify/get?_android=true&deviceId=android-d06f2b9b-3655-853f-8657-690291450208&1476174125010")
    Observable<TypeListEntry> getTypeList();

    @GET("/search/getMoreRecipe?_android=true&deviceId=android-b77c9a65-c072-13d1-8669-630287194508&1476602117331")
    Observable<EntrySearch>  getEntrySearch(@NonNull @Query("keyword") String keyWords, @NonNull @Query("pageIndex") int page, @NonNull @Query("pageSize") int pageSize);
    @GET("/search/get?_android=true&deviceId=android-b77c9a65-c072-13d1-8669-630287194508&1476603607758")
    Observable<QuestionSearch>  getQuestionSearch(@NonNull @Query("keyword") String keyWords);

    @GET("/keyword/detail?_android=true&deviceId=android-b77c9a65-c072-13d1-8669-630287194508&1476498061012")
    Observable<SearchEntry> getSearchMainInfo();

    @GET("index/get?_android=true&deviceId=android-d06f2b9b-3655-853f-8657-690291450208&1476173813309")
    Observable<LearnHP> getLearnMainInfo();

    //@GET("/v2/movie/top250")
    // Observable<MoveEntry> getListMoveTop(@Query("start") int start, @Query("count") int count);
    //Dynamic数据

    //@GET("question/getNew?pageIndex=0&pageSize=10&_android=true&deviceId=android-208984F9-8FBF-0000-8643-941020898468&1476190120849")
    @GET("question/getNew")
    Call<DynamicEntries> getDynamicInfo(
            @Query("pageIndex") int pageIndex
            , @Query("pageSize") int pageSize
            , @Query("_android") boolean _android
            , @Query("deviceId") String deviceId
    );
    @GET("groupbuy/getByClassifyId")
    Call<TuanTuanEntries> getTuanInfo(@Query("classifyId") int classifyId,@Query("pageIndex")int pageIndex,@Query("pageSize") int pageSize);
    //    http://api.hongbeibang.com/question/getQuestion?contentId=1915547&_android=true&deviceId=android-CAF733B6-ED88-0000-8643-940102022428&1476412329404
    @GET("question/getQuestion?_android=true&deviceId=android-CAF733B6-ED88-0000-8643-940102022428&1476412329404")
    Call<QuestionEntries> getQuestionInfo(@Query("contentId") int contentId);

    @GET("question/getAnswers?clientId=&pageIndex=20&pageSize=10&_android=true&deviceId=android-CAF733B6-ED88-0000-8643-940102022428&1476412333018:")
    Call<AnswerEntries> getAnswerInfo(@Query("contentId") int contentId);

    //http://api.hongbeibang.com/groupbuy/getAll?pageIndex=0&pageSize=10&_android=true&deviceId=android-d06f2b9b-3655-853f-8657-690291450208&1476176670051
    @GET("groupbuy/getAll?pageIndex=0&_android=true&deviceId=android-d06f2b9b-3655-853f-8657-690291450208&1476176670051")
    Call<HelpSaveEntris> getHelpSavaInfo(@Query("pageSize") int pageSize);

    @GET("item/getByFavoritesId?favorites_id=1296578&pageIndex=0&_android=true&deviceId=android-d06f2b9b-3655-853f-8657-690291450208&1476176896397")
    Call<HelpChoseEntries> getHelpChoseInfo(@Query("pageSize") int pageSize);


    /**
     * 烘焙圈轮播图
     *
     * @param _android
     * @param deviceId
     * @return
     */
    //http://api.hongbeibang.com/feed/getCategory?_android=true&deviceId=android-208984F9-8FBF-0000-8643-941020898468&1476189600143
    @GET("feed/getCategory")
    Call<FocusBean> getFocusBean(
            @Query("_android") boolean _android
            , @Query("deviceId") String deviceId
    );

    /**
     * 烘焙圈最新
     *
     * @param pageIndex
     * @param pageSize
     * @param _android
     * @param deviceId
     * @return
     */
    //http://api.hongbeibang.com/feed/getNew?pageIndex=0&pageSize=10&_android=true&deviceId=android-208984F9-8FBF-0000-8643-941020898468&1476189841189
    @GET("feed/getNew")
    Call<RecentBean> getRecentBean(
            @Query("pageIndex") int pageIndex
            , @Query("pageSize") int pageSize
            , @Query("_android") boolean _android
            , @Query("deviceId") String deviceId
    );
}
